package com.heima.user.conteoller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AttentionDto;
import com.heima.user.service.AttentionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
public class AttentionController {
    @Autowired
    private AttentionService attentionService;
    /**
     * 关注与取消关注
     * @return
     */
    @PostMapping("/user_follow")
    public ResponseResult attention(@RequestBody AttentionDto dto){
        return attentionService.attention(dto);
    }
}
